package L1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * A-B
 */
public class _011 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String A = reader.readLine();
        String B = reader.readLine();

        int[] b = new int[128];
        for (int i=0;i<B.length();i++){
            b[B.charAt(i)]++;
        }
        for (int i=0;i<A.length();i++){
            if (b[A.charAt(i)]==0){
                System.out.print(A.charAt(i));
            }
        }
        System.out.println();
    }
}
